<!-- The view to display or print medicine receipt -->
<script src="{$base_dir}modules/dept_medicine/js/AJAX_MedicineReceipt.js" type="text/javascript" ></script>
<script type="text/javascript">
{literal}
$(document).ready(function() {
    $('#getMedicineReceiptBtn').click(function() {
    	getMedicineReceipt();
    });
});
{/literal}
</script>

<div>
    <!-- Filter to search medicine receipt -->
    <table>
        <tr>
            <td>{translate}Month{/translate}</td>
            <td>
                <input type="text" id="monthTxt" onChange="javascript:listMedicineReceipt();"/>
                &nbsp;(mm/yyyy)&nbsp;
            </td>
            <td>{translate}Medicine receipt{/translate}</td>
            <td>
                <select name='medicineReceiptSearchLbx' id='medicineReceiptSearchLbx' wdith="150px">
                    <option id='empty' value='empty'>{translate}Select receipt{/translate}</option>
                </select>
            </td>
            <td rowspan="2" class="btn" width="100px">
                <div>
                    <a class='imgBtn'>
                        <img id='getMedicineReceiptBtn' title='{translate}List{/translate}' src="../images/search.png"/>
                    </a>
                </div>
            </td>
        </tr>
        <tr>
            <td>{translate}Medicine type{/translate}</td>
            <td>
	            <select name='medicineTypeSearchLbx' id='medicineTypeSearchLbx'>
	                <option id='all' value='all'>{translate}All{/translate}</option>
	                {html_options options=$medTypes}                    
	            </select>
            </td>
        </tr>
    </table>
</div>

<br>
<div>
    <form id='addMedicineReceiptForm' name='addMedicineReceiptForm'>
	    <table id='addMedicineReceiptTbl' cellspacing=0 cellpadding=0 class='grid'>      
	        <thead>
	            <tr>
	                <th class='first'>{translate}Medicine type{/translate}</th>
	                <th>{translate}Medicine name{/translate}</th>
	                <th>{translate}Quantity title{/translate}</th>
	                <th>{translate}Used number{/translate}</th>
	                <th>{translate}Remain number{/translate}</th>
	                <th class='last'>{translate}Require number{/translate}</th>
	            </tr>
	        </thead>
	        <tbody>
	        
	        </tbody>
	    </table>        
    </form>
    <br />
    <button id='addMedReceiptBtn' onclick="addOrUpdateMedReceipt();" disabled>{translate}Save-Print medicine receipt{/translate}</button>
    <img id='addingTemplate' style='display:none' src='../images/ajax-loader.gif'/>    
</div>